package com.ziyueyuwen.xiniao.dao;

import com.ziyueyuwen.xiniao.bean.ZyCourseInfo;
import com.ziyueyuwen.xiniao.bean.query.CourseQuery;
import com.ziyueyuwen.xiniao.bean.vo.ZyCourseVO;
import com.ziyueyuwen.xiniao.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * @author wancheng
 */
public interface ZyCourseInfoMapper extends BaseMapper<ZyCourseInfo>{
    /**
     * 获取课程
     * @param courseId
     * @param courseName
     * @return
     */
    List<ZyCourseVO> getCourse(@Param("courseId") Integer courseId, @Param("courseName") String courseName);

    /**
     * 获取课程
     * @param courseId
     * @return
     */
    ZyCourseVO getByCourseId(@Param("courseId")Integer courseId);

    /**
     * 获取课程
     * @param query
     * @return
     */
    List<ZyCourseVO> getCourseByCourseQuery(CourseQuery query);

    /**
     * 修改课程的课节数 自增
     * @param course
     */
    void updateCourseLessonCountIdentity(Integer course);

    /**
     * 删除空课程(指未创建班级的课程)
     * @param courseId Integer
     * @return Boolean
     */
    Boolean deleteEmptyCourseByCourseId(Integer courseId);

}